package com.juicygames.framework.draw.drawservice;

import com.juicygames.framework.draw.DrawDepth;
import com.juicygames.framework.gamepart.GameHandler;
import com.juicygames.framework.gamepart.GamePart;

public class Drawable implements Comparable<Drawable> {
	public GamePart entity;
	public DrawDepth depth;
	public GameHandler drawHandler;
	
	public int compareTo(Drawable other) {
		if (depth.getDepth() == other.depth.getDepth()) {
			return 0;
		} else if (depth.getDepth() < other.depth.getDepth()) {
			//reversing 1 and -1 to get low numbered drawables to get drawn last
			return 1;
		} else {
			return -1;
		}
	}
}